<div class="danhmuc">
</div><!--end .danhmuc-->
 <!---------------------------------------------->
<?php
	require_once('lib/sql.utils.php');
	$sql_utils = new SqlUtils();
	$result = $sql_utils->getRows('SELECT * FROM categories');
	for($i = 0; $i < count($result); $i++){
		echo '<div class="leftheader">';//leftheader
		echo '<p><a onclick = "getCategory('.$result[$i]['categoryId'].')">'.$result[$i]['categoryName'].'</a></p>';
		echo '</div>'; //end leftheader
		$detail = $result[$i]['categoryId'];
		$result_details = $sql_utils->getRows('SELECT * FROM categoryDetails WHERE categoryId = '.$detail);
		echo '<div class="leftcenter">'; //leftcenter
		for($j = 0; $j < count($result_details); $j++){
			$categoryDetailId = $result_details[$j]['categoryDetailId'];
			echo '<li><a id="='.$categoryDetailId.'" onclick="getCategoryDetail('.$categoryDetailId.')">';
			echo $result_details[$j]['categoryDetailName'];
			echo '</a></li>';
		}
		echo '</div>';// end leftcenter
		echo '<div class="leftfooter">';// leftfooter
		echo '</div>';//end leftfooter
	}
?>